﻿using Diploma.Web.Areas.Account.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Diploma.Web.Areas.Account.Controllers
{
    public class PostController : Controller
    {
        //
        // GET: /Account/Post/

        public ActionResult Index()
        {
            return View();
        }

        public ViewResult CreatePost()
        {
            return View();
        }

        public ViewResult CreatePostFrame()
        {
            return View(new PostModel());
        }

        [HttpPost]
        public ViewResult CreatePostFrame(PostModel post)
        {
            if (!ModelState.IsValid)
            {
                return View(post);
            }
            return View(new PostModel());
        }

    }
}
